Open
Conversation
Create BuildingType model with validations and methods for cost, construction time, and effects based on level. Add migration to create building_types table with necessary fields. Include FactoryBot factory for building types and RSpec tests to validate model behavior and instance methods.
Create Building model with associations, validations, and methods for construction and demolition progress. Add migration to create buildings table with necessary fields and foreign keys. Include FactoryBot factory for buildings and RSpec tests to validate model behavior and instance methods.
Update the level validation to ensure only integer values greater than zero are accepted. Modify the current_effect method to retrieve effects based on the building's level instead of a direct multiplication. Adjust related tests to reflect the change in error messaging for unique building types within star systems.
…stem model Refactor the tax revenue calculation in MaintenanceJob to sum tax income from each star system using the new calculate_tax_income method. Add methods for calculating tax income and tax modifiers based on operational buildings in the StarSystem model. Update tests to validate the new functionality and ensure accurate tax calculations.
…Gemfile.lock; enhance MaintenanceJob to manage building statuses during maintenance tasks with corresponding tests.
Implement BuildingsController to handle building creation and destruction with necessary authorization checks. Update routes to include buildings resource. Enhance star system edit view to display available buildings, their costs, and construction progress. Add modal for confirming building construction. Update Gemfile to include selenium-webdriver for testing. Add feature tests for building construction and demolition scenarios, ensuring proper resource management and user feedback.
…nd tests Remove unused database_cleaner dependencies from Gemfile.lock. Update README to reflect changes in Ruby version and add details about the new building system, including setup instructions and testing notes. Modify the building construction confirmation modal for improved visibility and update feature tests to ensure proper functionality of the building construction process.
Add frozen string literal comment to multiple files for performance optimization. Standardize string delimiters to single quotes throughout the codebase. Clean up whitespace and formatting in various files, including controllers, models, and views, to improve readability and maintainability. Update tests to reflect these changes and ensure consistent behavior across the application.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚀 Building Construction & Modal Magic! 🏗️✨
What’s New in the Voidfront Realms Elite Galaxy?
This PR brings a whole new dimension to your empire management experience—literally! Introducing the Building Construction System with a shiny, accessible, and progressively enhanced modal interface. Here’s what’s landed:
🏢 Building System
🧑💻 Progressive Enhancement & Accessibility
js: trueand scoped modal interactions—no more test_env? hacks!🧪 Testing & Dev Experience
🧹 Refactors & Cleanups
test_env?for a cleaner, more maintainable codebase.🛠️ How to Test
bin/rails db:seedto get the new building types.bundle exec rspec—all feature tests should pass!🌌 Why This Rocks
Let’s build the future—one star system at a time! 🪐